gtktreeselection: Eliminate a dead assignment
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Wed, 20 Nov 2013 17:37:15 +0000 (17:37 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Mon, 2 Dec 2013 10:36:26 +0000 (10:36 +0000)
This is technically a dead assignment, but is nice to retain for
clarity. Moving it to the variable definition shuts scan-build up.

https://bugzilla.gnome.org/show_bug.cgi?id=712760

gtk/gtktreeselection.c

index 65c09900c8fb28019d1f539004cddfdb3f7028d0..926c88dbb483d668c5f1efdc931f8c85a50ce643 100644 (file)
@@ -480,7 +480,7 @@ gtk_tree_selection_get_selected (GtkTreeSelection  *selection,
   GtkRBTree *tree;
   GtkRBNode *node;
   GtkTreePath *anchor_path;
-  gboolean retval;
+  gboolean retval = FALSE;
   gboolean found_node;
 
   g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), FALSE);
@@ -502,8 +502,6 @@ gtk_tree_selection_get_selected (GtkTreeSelection  *selection,
   if (anchor_path == NULL)
     return FALSE;
 
-  retval = FALSE;
-
   found_node = !_gtk_tree_view_find_node (priv->tree_view,
                                           anchor_path,
                                           &tree,